home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / macros / eplain / doc / eplain.info-2 (.txt) < prev    next >
GNU Info File  |  1994-05-01  |  49KB  |  921 lines

  1. This is Info file eplain.info, produced by Makeinfo-1.55 from the input
  2. file eplain.texi.
  3.   This file documents the Eplain macros.
  4.   Copyright (C) 1989, 90, 91, 92, 93, 94 Karl Berry.  Steven Smith
  5. wrote the documentation for the commutative diagram macros.  (He also
  6. wrote the macros.)
  7.   Permission is granted to make and distribute verbatim copies of this
  8. manual provided the copyright notice and this permission notice are
  9. preserved on all copies.
  10.   Permission is granted to copy and distribute modified versions of this
  11. manual under the conditions for verbatim copying, provided also that the
  12. section entitled "GNU General Public License" is included exactly as in
  13. the original, and provided that the entire resulting derived work is
  14. distributed under the terms of a permission notice identical to this
  15.   Permission is granted to copy and distribute translations of this
  16. manual into another language, under the above conditions for modified
  17. versions, except that the section entitled "GNU General Public License"
  18. may be included in a translation approved by the author instead of in
  19. the original English.
  20. File: eplain.info,  Node: Indexing,  Next: Justification,  Prev: Page references,  Up: User definitions
  21. Indexing
  22. ========
  23.   Eplain provides support for generating raw material for an index, and
  24. for typesetting a sorted index. A separate program must do the actual
  25. collection and sorting of terms, because TeX itself has no support for
  26. sorting.
  27.   Eplain's indexing commands were designed to work with the program
  28. MakeIndex, available from `ftp.math.utah.edu' in the directory
  29. `pub/tex/makeindex', and from CTAN hosts in
  30. `tex-archive/indexing/makeindex'; MakeIndex is also commonly included
  31. in prepackaged TeX distributions.  It is beyond the scope of this
  32. manual to explain how to run MakeIndex, and all of its many options.
  33. *Note MAKEINDEX: (makeindex)MAKEINDEX.
  34.   The basic strategy for indexing works like this:
  35.   1. For a document `foo.tex', Eplain's indexing commands (e.g.,
  36.      `\idx'; see the section `Indexing terms' below) write the raw index
  37.      material to `foo.idx'.
  38.   2. MakeIndex reads `foo.idx', collects and sorts the index, and
  39.      writes the result to `foo.ind'.
  40.   3. Eplain reads and typesets `foo.ind' on a subsequent run of TeX.
  41.      See the section `Typesetting an index' below.
  42.   If your document needs more than one index, each must have its own
  43. file. Therefore, Eplain provides the command `\defineindex', which
  44. takes an argument that is a single letter, which replaces `i' in the
  45. filenames and in the indexing command names described below. For
  46. example,
  47.      \defineindex{m}
  48. defines the command `\mdx' to write to the file `foo.mdx'. Eplain
  49. simply does `\defineindex{i}' to define the default commands.
  50. * Menu:
  51. * Indexing terms::        Specifying what to index.
  52. * Typesetting an index::    Printing the sorted output.
  53. * Customizing indexing::    Creating commands and specifying extra actions.
  54. File: eplain.info,  Node: Indexing terms,  Next: Typesetting an index,  Up: Indexing
  55. Indexing terms
  56. --------------
  57.   Indexing commands in Eplain come in pairs: one command that only
  58. writes the index entry to the `.idx' file (see above section), and one
  59. that also typesets the term being indexed. The former always starts
  60. with `s' (for "silent"). In either case, the name always includes
  61. `Idx', where I is the index letter, also described above. Eplain
  62. defines the index `i' itself, so that's what we'll use in the names
  63. below.
  64.   The silent form of the commands take a subterm as a trailing optional
  65. argument.  For example, `\sidx{truth}[definition of]' on page 75 makes
  66. an index entry that will eventually be typeset (by default) as
  67.      truth
  68.        definition of, 75
  69.   Also, the silent commands ignore trailing spaces. The non-silent ones
  70. do not.
  71. * Menu:
  72. * Indexing commands::        Making index entries.
  73. * Modifying index entries::    Ranges, see/see also, page number typesetting.
  74. * Proofing index terms::    Noting index entries in the margins.
  75. File: eplain.info,  Node: Indexing commands,  Next: Modifying index entries,  Up: Indexing terms
  76. Indexing commands
  77. .................
  78.   Here are the commands.
  79.    * `\sidx{TERM}[SUBTERM]' makes an index entry for TERM, optionally
  80.      with subterm SUBTERM.  `\idx{TERM}' also produces TERM as output.
  81.      Example:
  82.           \sidx{truth}[beauty of]
  83.           The beauty of truth is \idx{death}.
  84.    * \sidxname{FIRST M.}{VON LAST}[SUBTERM] makes an index entry for
  85.      `VON LAST, FIRST M.'. You can change the `, ' by redefining
  86.      `\idxnameseparator'.  \idxname{FIRST M.}{VON LAST} also produces
  87.      FIRST M. VON LAST as output. (These commands are useful special
  88.      cases of `\idx' and `\sidx'.) Example:
  89.           \sidxname{Richard}{Stark}
  90.           \idxname{Donald}{Westlake} has written many kinds of novels, under
  91.           almost as many names.
  92.    * `\sidxmarked\CS{TERM}[SUBTERM]' makes an index entry for
  93.      `TERM[SUBTERM]', but TERM will be put in the index as `\CS{term}',
  94.      but still sorted as just TERM.  `\idxmarked\CS{TERM}' also typesets
  95.      `\CS{term}'.  This provides for the usual ways of changing the
  96.      typesetting of index entries. Example:
  97.           \def\article#1{``#1''}
  98.           \sidxmarked\article{Miss Elsa and Aunt Sophie}
  99.           Peter Drucker's \idxmarked\article{The Polanyis} is a remarkable essay
  100.           about a remarkable family.
  101.    * `\sidxsubmarked{TERM}\CS{subterm}' makes an index entry for TERM,
  102.      SUBTERM as usual, but also puts SUBTERM in the index as
  103.      `\CS{term}'.  `\idxsubmarked{TERM}\CS{subterm}' also typesets
  104.      `TERM \CS{subterm}', in the unlikely event that your syntax is
  105.      convoluted enough to make this useful. Example:
  106.           \def\title#1{{\sl #1}}
  107.           \sidxsubmarked{Anderson, Laurie}\title{Strange Angels}
  108.           The \idxsubmarked{Anderson}\title{Carmen} is a strange twist.
  109.   The commands above rely on MakeIndex's feature for separating sorting
  110. of an index entry's from its typesetting. You can use this directly by
  111. specifying an index entry as `SORT@TYPESET'. For example:
  112.      \sidx{Ap-weight@$A_\pi$-weight}
  113. will sort as `Ap-weight', but print with the proper math.  The `@' here
  114. is MakeIndex's default character for this purpose.  *Note Style
  115. File-MakeIndex: (makeindex)Style File-MakeIndex. To make an index entry
  116. with an `@' in it, you have to escape it with a backslash; Eplain
  117. provides no macros for doing this.
  118.   After any index command, Eplain runs `\hookaction{afterindexterm}'.
  119. Because the index commands always add a whatsit item to the current
  120. list, you may wish to preserve a penalty or space past the new item.
  121. For example, given a conditional `\if@aftersctnhead' set true when
  122. you're at a section heading, you could do:
  123.      \hookaction{afterindexterm}{\if@aftersctnhead \nobreak \fi}
  124. File: eplain.info,  Node: Modifying index entries,  Next: Proofing index terms,  Prev: Indexing commands,  Up: Indexing terms
  125. Modifying index entries
  126. .......................
  127.   All the index commands described in the previous section take an
  128. initial optional argument before the index term, which modify the index
  129. entry's meaning in various ways.  You can specify only one of the
  130. following in any given command.
  131.   These work via MakeIndex's "encapsulation" feature. *Note Customizing
  132. indexing::, if you're not using the default characters for the
  133. MakeIndex operators.  The other optional argument (specifying a subterm)
  134. is independent of these.
  135.   Here are the possibilities:
  136. `begin'
  137. `end'
  138.      These mark an index entry as the beginning or end of a range. The
  139.      index entries must match exactly for MakeIndex to recognize them.
  140.      Example:
  141.           \sidx[begin]{future}[Cohen, Leonard]
  142.           ...
  143.           \sidx[end]{future}[Cohen, Leonard]
  144.      will typeset as something like
  145.           future,
  146.             Cohen, Leonard, 65--94
  147. `see'
  148.      This marks an index entry as pointing to another; the real index
  149.      term is an additional (non-optional) argument to the command. Thus
  150.      you can anticipate a term readers may wish to look up, yet which
  151.      you have decided not to index. Example:
  152.           \sidx[see]{analysis}[archetypal]{archetypal criticism}
  153.      becomes
  154.           analysis,
  155.             archetypal,  See archetypal criticism
  156. `seealso'
  157.      Similar to `see' (the previous item), but also allows for normal
  158.      index entries of the referencing term. Example:
  159.           \sidx[seealso]{archetypal criticism}[elements of]{dichotomies}
  160.      becomes
  161.           archetypal criticism,
  162.             elements of, 75, 97, 114, See also dichotomies
  163.      (Aside for the academically curious: The archetypally critical
  164.      book I took these dichotomous examples from is Laurence Berman's
  165.      `The Musical Image', which I happened to co-design and typeset.)
  166. `pagemarkup=CS'
  167.      This puts `\CS' before the page number in the typeset index, thus
  168.      allowing you to underline definitive entries, italicize examples,
  169.      and the like. You do *not* precede the control sequence CS with a
  170.      backslash. (That just leads to expansive difficulties.) Naturally
  171.      it is up to you to define the control sequences you want to use.
  172.      Example:
  173.           \def\defn#1{{\sl #1}}
  174.           \sidx[pagemarkeup=defn]{indexing}
  175.      becomes something like
  176.           indexing, `\defn{75}'
  177. File: eplain.info,  Node: Proofing index terms,  Prev: Modifying index entries,  Up: Indexing terms
  178. Proofing index terms
  179. ....................
  180.   As you are reading through a manuscript, it is helpful to see what
  181. terms have been indexed, so you can add others, catch miscellaneous
  182. errors, etc. (Speaking from bitter experience, I can say it is extremely
  183. error-prone to leave all indexing to the end of the writing, since it
  184. involves adding many TeX commands to the source files.)
  185.   So Eplain puts index terms in the margin of each page, if you set
  186. `\indexproofingtrue'. It is `false' by default. The terms are typeset
  187. by the macro `\indexproofterm', which takes a single argument, the term
  188. to be typeset. Eplain's definition of `\indexproofterm' just puts it
  189. into an `\hbox', first doing `\indexprooffont', which Eplain defines to
  190. select the font `cmtt8'. With this definition long terms run off the
  191. page, but since this is just for proofreading anyway, it seems
  192. acceptable.
  193.   On the other hand, we certainly don't want the index term to run into
  194. the text of the page, so Eplain uses the right-hand side of the page
  195. rather than the left-hand page (assuming a language read left to right
  196. here). So `\ifodd\pageno', Eplain kerns by `\outsidemargin', otherwise
  197. by `\insidemargin'. If those macros are undefined, `\indexsetmargins'
  198. defines them to be one inch plus `\hoffset'.
  199.   To get the proofing index entries on the proper page, Eplain defines
  200. a new insertion class `\@indexproof'. To unbox any index proofing
  201. material, Eplain redefines `\makeheadline' to call `\indexproofunbox'
  202. before the original `\makeheadline'. Thus, if you have your own output
  203. routine, that redefines or doesn't use `\makeheadline', it's up to you
  204. to call `\indexproofunbox' at the appropriate time.
  205. File: eplain.info,  Node: Typesetting an index,  Next: Customizing indexing,  Prev: Indexing terms,  Up: Indexing
  206. Typesetting an index
  207. --------------------
  208.   The command `\readindexfile{i}' reads and typesets the `.ind' file
  209. that MakeIndex outputs (from the `.idx' file which the indexing
  210. commands in the previous sections write).  Eplain defines a number of
  211. commands that support the default MakeIndex output.
  212.   More precisely, `\readindexfile' reads
  213. `\indexfilebasename.INDEX-LETTERnd', where the INDEX-LETTER is the
  214. argument. `\indexfilebasename' is `\jobname' by default, but if you
  215. have different indexes in different parts of a book, you may wish to
  216. change it, just as with bibliographies (*note Citations::.).
  217.   MakeIndex was designed to work with LaTeX; therefore, by default the
  218. `.ind' file starts with `\begin{theindex}' and ends with
  219. `\end{theindex}'. If no `\begin' has been defined, Eplain defines one
  220. to ignore its argument and set up for typesetting the index (see
  221. below), and also defines a `\end' to ignore its argument. (In a group,
  222. naturally, since there is a primitive `\end').
  223.   Eplain calls `\indexfonts', sets `\parindent = 0pt', and does
  224. `\doublecolumns' (*note Multiple columns::.) at the `\begin{theindex}'.
  225. `\indexfonts' does nothing by default; it's just there for you to
  226. override. (Indexes are usually typeset in smaller type than the main
  227. text.)
  228.   It ends the setup with `\hookrun{beginindex}', so you can override
  229. anything you like in that hook (*note Hooks::.). For example:
  230.      \hookaction{beginindex}{\triplecolumns}
  231.   MakeIndex turns each main index entry into an `\item', subentries
  232. into `\subitem', and subsubentries into `\subsubitem'. By default, the
  233. first line of main entries are not indented, and subentries are
  234. indented 1em per level. Main entries are preceded by a `\vskip' of
  235. `\aboveitemskipamount', `0pt plus2pt' by default. Page breaks are
  236. encouraged before main entries (`\penalty -100'), but prohibited
  237. afterwards--Eplain has no provision for "continued" index entries.
  238.   All levels do the following:
  239.      \hangindent = 1em
  240.      \raggedright
  241.      \hyphenpenalty = 10000
  242.   Each entry ends with `\hookrun{indexitem}', so you can change any of
  243. this. For example, to increase the allowable rag:
  244.      \hookaction{indexitem}{\advance\rightskip by 2em}
  245.   Finally, MakeIndex outputs `\indexspace' between each group of
  246. entries in the `.ind' file. Eplain makes this equivalent to `\bigbreak'.
  247. File: eplain.info,  Node: Customizing indexing,  Prev: Typesetting an index,  Up: Indexing
  248. Customizing indexing
  249. --------------------
  250.   By default, MakeIndex outputs `, ' after each term in the index. To
  251. change this, you can add the following to your MakeIndex style (`.ist')
  252. file:
  253.      delim_0 "\\afterindexterm "
  254.      delim_1 "\\afterindexterm "
  255.      delim_2 "\\afterindexterm "
  256. Eplain makes `\afterindexterm' equivalent to `\quad'.
  257.   You can also change the keywords Eplain recognizes (*note Modifying
  258. index entries::.):
  259. `\idxbeginrangeword'
  260.      `begin'
  261. `\idxendrangeword'
  262.      `end
  263. `\idxseeword'
  264.      `see
  265. `\idxseealsoword'
  266.      `seealso'
  267.   You can also change the magic characters Eplain puts into the `.idx'
  268. file, in case you've changed them in the `.ist' file:
  269. `\idxsubentryseparator'
  270.      `!'
  271. `\idxencapoperator'
  272.      `|'
  273. `\idxbeginrangemark'
  274.      `('
  275. `\idxendrangemark'
  276.      `)'
  277.   There is no macro for the `actual' (`@' by default) character,
  278. because it's impossible to make it expand properly.
  279.   Finally, you can change the (imaginary) page number that "see also"
  280. entries sort as by redefining `\idxmaxpagenum'. This is 99999 by
  281. default, which is one digit too many for old versions of MakeIndex.
  282. File: eplain.info,  Node: Justification,  Next: Tables,  Prev: Indexing,  Up: User definitions
  283. Justification
  284. =============
  285.   Eplain defines three commands to conveniently justify multiple lines
  286. of text: `\flushright', `\flushleft', and `\center'.
  287.   They all work in the same way; let's take `\center' as the example.
  288. To start centering lines, you say `\center' inside a group; to stop,
  289. you end the group.  Between the two commands, each end-of-line in the
  290. input file also starts a new line in the output file.
  291.   The entire block of text is broken into paragraphs at blank lines, so
  292. all the TeX paragraph-shaping parameters apply in the usual way.  This
  293. is convenient, but it implies something else that isn't so convenient:
  294. changes to any linespacing parameters, such as `\baselineskip', will
  295. have *no effect* on the paragraph in which they are changed.  TeX does
  296. not handle linespacing changes within a paragraph (because it doesn't
  297. know where the line breaks are until the end of the paragraph).
  298.   The space between paragraphs is by default one blank line's worth.
  299. You can adjust this space by assigning to `\blanklineskipamount'; this
  300. (vertical) glue is inserted after each blank line.
  301.   Here is an example:
  302.      {\center First line.
  303.      
  304.         Second line, with a blank line before.
  305.      }
  306.   This produces:
  307.                               First line.
  308.                                    
  309.                 Second line, with a blank line before.
  310.   You may wish to use the justification macros inside of your own
  311. macros.  Just be sure to put them in a group.  For example, here is how
  312. a title macro might be defined:
  313.      \def\title{\begingroup\titlefont\center}
  314.      \def\endtitle{\endgroup}
  315. File: eplain.info,  Node: Tables,  Next: Margins,  Prev: Justification,  Up: User definitions
  316. Tables
  317. ======
  318.   Eplain provides a single command, `\makecolumns', to make generating
  319. one particular kind of table easier.  More ambitious macro packages
  320. might be helpful to you for more difficult applications.  The files
  321. `ruled.tex' and `TXSruled.tex', available from `lifshitz.ph.utexas.edu'
  322. in `texis/tables', is the only one I know of.
  323.   Many tables are homogenous, i.e., all the entries are semantically the
  324. same.  The arrangement into columns is to save space on the page, not
  325. to encode different meanings.  In this kind of the table, it is useful
  326. to have the column breaks chosen automatically, so that you can add or
  327. delete entries without worrying about the column breaks.
  328.   `\makecolumns' takes two arguments: the number of entries in the
  329. table, and the number of columns to break them into.  As you can see
  330. from the example below, the first argument is delimited by a slash, and
  331. the second by a colon and a space (or end-of-line).  The entries for the
  332. table then follow, one per line (not including the line with the
  333. `\makecolumns' command itself).
  334.   `\parindent' defines the space to the left of the table.  `\hsize'
  335. defines the width of the table.  So you can adjust the position of the
  336. table on the page by assignments to these parameters, probably inside a
  337. group.
  338.   You can also control the penalty at a page break before the
  339. `\makecolumns' by setting the parameter `\abovecolumnspenalty'.
  340. Usually, the table is preceded by some explanatory text.  You wouldn't
  341. want a page break to occur after the text and before the table, so
  342. Eplain sets it to `10000'.  But if the table produced by `\makecolumns'
  343. is standing on its own, `\abovecolumnspenalty' should be decreased.
  344.   If you happen to give `\makecolumns' a smaller number of entries than
  345. you really have, some text beyond the (intended) end of the table will
  346. be incorporated into the table, probably producing an error message, or
  347. at least some strange looking entries.  And if you give `\makecolumns'
  348. a larger number of entries than you really have, some of the entries
  349. will be typeset as straight text, probably also looking somewhat out of
  350. place.
  351.   Here is an example:
  352.      % Arrange 6 entries into 2 columns:
  353.      \makecolumns 6/2: % This line doesn't have an entry.
  354.      one
  355.      two
  356.      three
  357.      four
  358.      five
  359.      six
  360.      Text after the table.
  361.   This produces `one', `two', and `three' in the first column, and
  362. `four', `five', and `six' in the second.
  363. File: eplain.info,  Node: Margins,  Next: Multiple columns,  Prev: Tables,  Up: User definitions
  364. Margins
  365. =======
  366.   TeX's primitives describe the type area in terms of an offset from
  367. the upper left corner, and the width and height of the type.  Some
  368. people prefer to think in terms of the "margins" at the top, bottom,
  369. left, and right of the page, and most composition systems other than
  370. TeX conceive of the page laid out in this way.  Therefore, Eplain
  371. provides commands to directly assign and increment the margins.
  372. `\topmargin = DIMEN'
  373. `\bottommargin = DIMEN'
  374. `\leftmargin = DIMEN'
  375. `\rightmargin = DIMEN'
  376.      These commands set the specified margin to the DIMEN given.  The
  377.      `=' and the spaces around it are optional.  The control sequences
  378.      here are not TeX registers, despite appearances; therefore,
  379.      commands like `\showthe\topmargin' will not do what you expect.
  380. `\advancetopmargin by DIMEN'
  381. `\advancebottommargin by DIMEN'
  382. `\advanceleftmargin by DIMEN'
  383. `\advancerightmargin by DIMEN'
  384.      These commands change the specified margin by the DIMEN given.
  385.   Regardless of whether you use the assignment or the advance commands,
  386. Eplain always changes the type area in response, not the other margins.
  387. For example, when TeX starts, the left and right margins are both one
  388. inch.  If you then say `\leftmargin = 2in', the right margin will
  389. remain at one inch, and the width of the lines (i.e., `\hsize') will
  390. decrease by one inch.
  391.   When you use any of these commands, Eplain computes the old value of
  392. the particular margin, by how much you want to change it, and then
  393. resets the values of TeX's primitive parameters to correspond.
  394. Unfortunately, Eplain cannot compute the right or bottom margin without
  395. help: you must tell it the full width and height of the final output
  396. page.  It defines two new parameters for this:
  397. `\paperheight'
  398.      The height of the output page; default is 11in.
  399. `\paperwidth'
  400.      The width of the output page; default is 8.5in.
  401.   If your output page has different dimensions than this, you must
  402. reassign to these parameters, as in
  403.      \paperheight = 11in
  404.      \paperwidth = 17in
  405. File: eplain.info,  Node: Multiple columns,  Next: Footnotes,  Prev: Margins,  Up: User definitions
  406. Multiple columns
  407. ================
  408.   Eplain provides for double, triple, and quadruple column output:  say
  409. `\doublecolumns', `\triplecolumns', or `\quadcolumns', and from that
  410. point on, the manuscript will be set in columns.  To go back to one
  411. column, say `\singlecolumn'.
  412.   You may need to invoke `\singlecolumn' to balance the columns on the
  413. last page of output.
  414.   To do a "column eject", i.e., move to the top of the next column, do
  415. `\columnfill'. This does not actually force an eject, however: it
  416. merely inserts a kern of size `\@normalvsize' minus `\pagetotal'
  417. (`\@normalvsize' being the usual height of the page; to implement
  418. multicolumns, Eplain multiplies `\vsize' itself by the number of
  419. columns). In most circumstances, a column break will be forced after
  420. this kern (during the column splitting operation when the whole page is
  421. output), as desired.
  422.   The columns are separated by the value of the dimen parameter
  423. `\gutter'.  Default value is two picas.
  424.   All the `\...columns' macros insert the value of the glue parameter
  425. `\abovedoublecolumnskip' before the multicolumn text, and the value of
  426. the glue parameter `\belowdoublecolumnskip' after it.  The default
  427. value for both of these parameters is `\bigskipamount', i.e., one
  428. linespace in plain TeX.
  429.   The macros take into account only the insertion classes defined by
  430. plain TeX; namely, footnotes and `\topinsert's.  If you have additional
  431. insertion classes, you will need to change the implementation.
  432.   Also, Eplain makes insertions the full page width. There is no
  433. provision for column-width insertions.
  434. File: eplain.info,  Node: Footnotes,  Next: Fractions,  Prev: Multiple columns,  Up: User definitions
  435. Footnotes
  436. =========
  437.   The most common reference mark for footnotes is a raised number,
  438. incremented on each footnote.  The `\numberedfootnote' macro provides
  439. this.  It takes one argument, the footnote text.
  440.   If your document uses only numbered footnotes, you could make typing
  441. `\numberedfootnote' more convenient with a command such as:
  442.      \let\footnote = \numberedfootnote
  443.   After doing this, you can type your footnotes as `\footnote{FOOTNOTE
  444. TEXT}', instead of as `\numberedfootnote{FOOTNOTE TEXT}'.
  445.   Eplain keeps the current footnote number in the count register
  446. `\footnotenumber'.  So, to reset the footnote number to zero, as you
  447. might want to do at, for example, the beginning of a chapter, you could
  448. say `\footnotenumber=0'.
  449.   Plain TeX separates the footnote marker from the footnote text by an
  450. en space (it uses the `\textindent' macro).  In Eplain, you can change
  451. this space by setting the dimension register `\footnotemarkseparation'.
  452. The default is still an en.
  453.   You can produce a space between footenotes by setting the glue
  454. register `\interfootnoteskip'.  The default is zero.
  455.   `\parskip' is also set to zero by default before the beginning of
  456. each footnote (but not for the text of the footnote).
  457.   You can also control footnote formatting in a more general way:
  458. Eplain expands the token register `\everyfootnote' before a footnote is
  459. typeset, but after the default values for all the parameters have been
  460. established.  For example, if you want your footnotes to be printed in
  461. seven-point type, indented by one inch, you could say:
  462.      \everyfootnote = {\sevenrm \leftskip = 1in}
  463.   By default, an `\hrule' is typeset above each group of footnotes on a
  464. page.  You can control the dimensions of this rule by setting the
  465. dimension registers `\footnoterulewidth' and `\footnoteruleheight'.
  466. The space between the rule and the first footnote on the page is
  467. determined by the dimension register `\belowfootnoterulespace'.  If you
  468. don't want any rule at all, set `\footenoteruleheight=0pt', and, most
  469. likely, `\belowfootnoterulespace=0pt'.  The defaults for these
  470. parameters typeset the rule in the same way as plain TeX: the rule is
  471. 0.4 points high, 2 true inches wide, with 2.6 points below it.
  472.   The space above the rule and below the text on the page is controlled
  473. by the glue register `\skip\footins'.  The default is a plain TeX
  474. `\bigskip'.
  475. File: eplain.info,  Node: Fractions,  Next: Paths,  Prev: Footnotes,  Up: User definitions
  476. Fractions
  477. =========
  478.   Exercise 11.6 of `The TeXbook' describes a macro `\frac' for setting
  479. fractions, but `\frac' never made it into plain TeX.  So Eplain
  480. includes it.
  481.   `\frac' typesets the numerator and denominator in `\scriptfont0',
  482. slightly raised and lowered.  The numerator and denominator are
  483. separated by a slash.  The denominator must be enclosed in braces if
  484. it's more than one token long, but the numerator need not be.  (This is
  485. a consequence of `\frac' taking delimited arguments; see page 203 of
  486. `The TeXbook' for an explanation of delimited macro arguments.)
  487.   For example, `\frac 23/{64}' turns `23/64' into 23/64 (you can't see
  488. the difference in the Info file).
  489. File: eplain.info,  Node: Paths,  Next: Logos,  Prev: Fractions,  Up: User definitions
  490. Paths
  491. =====
  492.   When you typeset long pathnames, electronic mail addresses, or other
  493. such "computer" names, you would like TeX to break lines at punctuation
  494. characters within the name, rather than trying to find hyphenation
  495. points within the words.  For example, it would be better to break the
  496. email address `letters@alpha.gnu.ai.mit.edu' at the `@' or a `.',
  497. rather than at the hyphenation points in `letters' and `alpha'.
  498.   If you use the `\path' macro to typeset the names, TeX will find
  499. these good breakpoints.  The argument to `\path' is delimited by any
  500. other other than `\' which does not appear in the name itself.  `|' is
  501. often a good choice, as in:
  502.      \path|letters@alpha.gnu.ai.mit.edu|
  503.   You can control the exact set of characters at which breakpoints will
  504. be allowed by calling `\discretionaries'.  This takes the same sort of
  505. delimited argument; any character in the argument will henceforth be a
  506. valid breakpoint within `\path'.  The default set is essentially all the
  507. punctuation characters:
  508.      \discretionaries |~!@$%^&*()_+`-=#{}[]:";'<>,.?\/|
  509.   If for some reason you absolutely must use `\' as the delimiter
  510. character for `\path', you can set `\specialpathdelimiterstrue'.
  511. (Other delimiter characters can still be used.)  TeX then processes the
  512. `\path' argument about four times more slowly.
  513. File: eplain.info,  Node: Logos,  Next: Boxes,  Prev: Paths,  Up: User definitions
  514. Logos
  515. =====
  516.   Eplain redefines the `\TeX' macro of plain TeX to end with `\null',
  517. so that the proper spacing is produced when `\TeX' is used at the end
  518. of a sentence.  The other ...TeX macros listed here do this, also.
  519.   Eplain defines `\AMSTeX', `\BibTeX' `\AMSLaTeX', `\LAMSTeX', `\LaTeX'
  520. `\MF', and `\SLiTeX' to produce their respective logos.  (Sorry, the
  521. logos are not shown here.)  Some spelling variants of these are also
  522. supported.
  523. File: eplain.info,  Node: Boxes,  Prev: Logos,  Up: User definitions
  524. Boxes
  525. =====
  526.   The solid rectangle that Eplain uses as a marker in unordered lists
  527. (*note Lists::.) is available by itself: just say `\blackbox'.
  528.   You can create black boxes of arbitrary size with `\hrule' or
  529. `\vrule'.
  530.   You can also get unfilled rectangles with `\makeblankbox'.  This
  531. takes two explicit arguments: the height and depth of the rules that
  532. define the top and bottom of the rectangle.  (The two arguments are
  533. added to get the width of the left and right borders, so that the
  534. thickness of the border is the same on all four sides.)  It also uses,
  535. as implicit arguments, the dimensions of `\box0' to define the
  536. dimensions of the rectangle it produces.  (The contents of `\box0' are
  537. ignored.)
  538.   Here is an example.  This small raised open box is suitable for
  539. putting next to numbers in, e.g., a table of contents.
  540.      \def\openbox{%
  541.        \ht0 = 1.75pt \dp0 = 1.75pt \wd0 = 3.5pt
  542.        \raise 2.75pt \makeblankbox{.2pt}{.2pt}
  543.      }
  544.   Finally, you can put a box around arbitrary text with `\boxit'.  This
  545. takes one argument, which must itself be a (TeX) box, and puts a
  546. printed box around it, separated by `\boxitspace' white space (3 points
  547. by default) on all four sides.  For example:
  548.      \boxit{\hbox{This text is boxed.}}
  549.   The reason that the argument must be a box is that when the text is
  550. more than one line long, TeX cannot figure out the line length for
  551. itself.  Eplain does set `\parindent' to zero inside `\boxit', since it
  552. is very unlikely you would want indentation there.  (If you do, you can
  553. always reset it yourself.)
  554.   `\boxit' uses `\ehrule' and `\evrule' so that you can easily adjust
  555. the thicknesses of the box rules.  *Note Rules::.
  556. File: eplain.info,  Node: Arrow theoretic diagrams,  Next: Programming definitions,  Prev: User definitions,  Up: Top
  557. Arrow theoretic diagrams
  558. ************************
  559.   This chapter describes definitions for producing commutative diagrams.
  560.   Steven Smith wrote this documentation (and the macros).
  561. * Menu:
  562. * Slanted lines and vectors::
  563. * Commutative diagrams::
  564. File: eplain.info,  Node: Slanted lines and vectors,  Next: Commutative diagrams,  Up: Arrow theoretic diagrams
  565. Slanted lines and vectors
  566. =========================
  567.   The macros `\drawline' and `\drawvector' provide the capability found
  568. in LaTeX's picture mode to draw slanted lines and vectors of certain
  569. directions.  Both of these macros take three arguments: two integer
  570. arguments to specify the direction of the line or vector, and one
  571. argument to specify its length.  For example, `\drawvector(-4,1){60pt}'
  572. produces the vector
  573.       (A vector in the 2d quadrant of length 60 pt appears here.)
  574.   which lies in the 2d quadrant, has a slope of minus 1/4, and a width
  575. of 60 pt.
  576.   Note that if an `\hbox' is placed around `\drawline' or
  577. `\drawvector', then the width of the `\hbox' will be the positive
  578. dimension specified in the third argument, except when a vertical line
  579. or vector is specified, e.g., `\drawline(0,1){1in}', which has zero
  580. width.  If the specified direction lies in the 1st or 2d quadrant
  581. (e.g., `(1,1)' or `(-2,3)'), then the `\hbox' will have positive height
  582. and zero depth.  Conversely, if the specified direction lies in the 3d
  583. or 4th quadrant (e.g., `(-1,-1)' or `(2,-3)'), then the `\hbox' will
  584. have positive depth and zero height.
  585.   There are a finite number of directions that can be specified.  For
  586. `\drawline', the absolute value of each integer defining the direction
  587. must be less than or equal to six, i.e., `(7,-1)' is incorrect, but
  588. `(6,-1)' is acceptable. For `\drawvector', the absolute value of each
  589. integer must be less than or equal to four.  Furthermore, the two
  590. integers cannot have common divisors; therefore, if a line with slope 2
  591. is desired, say `(2,1)' instead of `(4,2)'.  Also, specify `(1,0)'
  592. instead of, say, `(3,0)' for horizontal lines and likewise for vertical
  593. lines.
  594.   Finally, these macros depend upon the LaTeX font `line10'.  If your
  595. site doesn't have this font, ask your system administrator to get it.
  596. Future enhancements will include macros to draw dotted lines and dotted
  597. vectors of various directions.
  598. File: eplain.info,  Node: Commutative diagrams,  Prev: Slanted lines and vectors,  Up: Arrow theoretic diagrams
  599. Commutative diagrams
  600. ====================
  601.   The primitive commands `\drawline' and `\drawvector' can be used to
  602. typeset arrow theoretic diagrams.  This section describes (1) macros to
  603. facilitate typesetting arrows and morphisms, and (2) macros to
  604. facilitate the construction of commutative diagrams.  All macros
  605. described in this section must be used in math mode.
  606. * Menu:
  607. * Arrows and morphisms::
  608. * Construction of commutative diagrams::
  609. * Commutative diagram parameters::
  610. File: eplain.info,  Node: Arrows and morphisms,  Next: Construction of commutative diagrams,  Up: Commutative diagrams
  611. Arrows and morphisms
  612. --------------------
  613.   The macros `\mapright' and `\mapleft' produce right and left pointing
  614. arrows, respectively.  Use superscript (`^') to place a morphism above
  615. the arrow, e.g., `\mapright^\alpha'; use subscript (`_') to place a
  616. morphism below the arrow, e.g., `\mapright_{\tilde l}'.  Superscripts
  617. and subscripts may be used simulataneously, e.g., `\mapright^\pi_{\rm
  618. epimor.}'.
  619.   Similarly, the macros `\mapup' and `\mapdown' produce up and down
  620. pointing arrows, respectively.  Use `\rt' to place a morphism to the
  621. right of the arrow, e.g., `\mapup\rt{\rm id}'; use `\lft' to place a
  622. morphism to the left of the arrow, e.g., `\mapup\lft\omega'.  `\lft'
  623. and `\rt' may be used simultaneously, e.g., `\mapdown\lft\pi\rt{\rm
  624. monomor.}'.
  625.   Slanted arrows are produced by the macro `\arrow', which takes a
  626. direction argument (e.g., `\arrow(3,-4)').  Use `\rt' and `\lft' to
  627. place morphisms to the right and left, respectively, of the arrow.  A
  628. slanted line (no arrowhead) is produced with the macro `\sline', whose
  629. syntax is identical to that of `\arrow'.
  630.   The length of these macros is predefined by the default TeX
  631. dimensions `\harrowlength', for horizontal arrows (or lines),
  632. `\varrowlength', for vertical arrows (or lines), and `\sarrowlength',
  633. for slanted arrows (or lines).  To change any of these dimensions, say,
  634. e.g., `\harrowlength=40pt'.  As with all other TeX dimensions, the
  635. change may be as global or as local as you like.  Furthermore, the
  636. placement of morphisms on the arrows is controlled by the dimensions
  637. `\hmorphposn', `\vmorphposn', and `\morphdist'.  The first two
  638. dimensions control the horizontal and vertical position of the morphism
  639. from its default position; the latter dimension controls the distance
  640. of the morphism from the arrow.  If you have more than one morphism per
  641. arrow (i.e., a `^'/`_' or `\lft'/`\rt' construction), use the parameters
  642. `\hmorphposnup', `\hmorphposndn', `\vmorphposnup', `\vmorphposndn',
  643. `\hmorphposnrt', `\hmorphposnlft', `\vmorphposnrt', and
  644. `\vmorphposnlft'.  The default values of all these dimensions are
  645. provided in the section on parameters that follows below.
  646.   There is a family of macros to produce horizontal lines, arrows, and
  647. adjoint arrows.  The following macros produce horizontal maps and have
  648. the same syntax as `\mapright':
  649. `\mapright'
  650.      `$X\mapright Y$' = (a right arrow).
  651. `\mapleft'
  652.      `$X\mapleft Y$' = (a left arrow).
  653. `\hline'
  654.      `$X\hline Y$' = (horizontal line)
  655. `\bimapright'
  656.      `$X\bimapright Y$' = (two right arrows).
  657. `\bimapleft'
  658.      `$X\bimapleft Y$' = (two left arrows)
  659. `\adjmapright'
  660.      `$X\adjmapright Y$' = (two adjoint arrows; left over right)
  661. `\adjmapleft'
  662.      `$X\adjmapleft Y$' = (two adjoint arrows; right over left)
  663. `\bihline'
  664.      `$X\bihline Y$' = (two horizontal lines)
  665.   There is also a family of macros to produce vertical lines, arrows,
  666. and adjoint arrows.  The following macros produce vertical maps and have
  667. the same syntax as `\mapdown':
  668. `\mapdown'
  669.      (a down arrow)
  670. `\mapup'
  671.      (an up arrow)
  672. `\vline'
  673.      (vertical line)
  674. `\bimapdown'
  675.      (two down arrows)
  676. `\bimapup'
  677.      (two up arrows)
  678. `\adjmapdown'
  679.      (two adjoint arrows; down then up)
  680. `\adjmapup'
  681.      (two adjoint arrows; up then down)
  682. `\bivline'
  683.      (two vertical lines)
  684.   Finally, there is a family of macros to produce slanted lines, arrows,
  685. and adjoint arrows.  The following macros produce slanted maps and have
  686. the same syntax as `\arrow':
  687. `\arrow'
  688.      (a slanted arrow)
  689. `\sline'
  690.      (a slanted line)
  691. `\biarrow'
  692.      (two straight arrows)
  693. `\adjarrow'
  694.      (two adjoint arrows)
  695. `\bisline'
  696.      (two straight lines)
  697.   The width between double arrows is controlled by the parameter
  698. `\channelwidth'.  The parameters `\hchannel' and `\vchannel', if
  699. nonzero, override `\channelwidth' by controlling the horizontal and
  700. vertical shifting from the first arrow to the second.
  701.   There are no adornments on these arrows to distinguish inclusions from
  702. epimorphisms from monomorphisms.  Many texts, such as Lang's book
  703. `Algebra', use as a tasteful alternative the symbol `inc' (in roman)
  704. next to an arrow to denote inclusion.
  705.   Future enhancements will include a mechanism to draw curved arrows
  706. found in, e.g., the Snake Lemma, by employing a version of the `\path'
  707. macros of Appendix D of `The TeXbook'.
  708. File: eplain.info,  Node: Construction of commutative diagrams,  Next: Commutative diagram parameters,  Prev: Arrows and morphisms,  Up: Commutative diagrams
  709. Construction of commutative diagrams
  710. ------------------------------------
  711.   There are two approaches to the construction of commutative diagrams
  712. described here.  The first approach, and the simplest, treats
  713. commutative diagrams like fancy matrices, as Knuth does in Exercise
  714. 18.46 of `The TeXbook'.  This case is covered by the macro `\commdiag',
  715. which is an altered version of the Plain TeX macro `\matrix'.  An
  716. example suffices to demonstrate this macro.  The following commutative
  717. diagram (illustrating the covering homotopy property; Bott and Tu,
  718. `Differential Forms in Algebraic Topology')
  719.       (A commutative diagram appears here in the printed output.)
  720.   is produced with the code
  721.      $$\commdiag{Y&\mapright^f&E\cr \mapdown&\arrow(3,2)\lft{f_t}&\mapdown\cr
  722.      Y\times I&\mapright^{\bar f_t}&X}$$
  723.   Of course, the parameters may be changed to produce a different
  724. effect.  The following commutative diagram (illustrating the universal
  725. mapping property; Warner, `Foundations of Differentiable Manifolds and
  726. Lie Groups')
  727.       (A commutative diagram appears here in the printed output.)
  728.   is produced with the code
  729.      $$\varrowlength=20pt
  730.      \commdiag{V\otimes W\cr \mapup\lft\phi&\arrow(3,-1)\rt{\tilde l}\cr
  731.      V\times W&\mapright^l&U\cr}$$
  732.   A diagram containing isosceles triangles is achieved by placing the
  733. apex of the triangle in the center column, as shown in the example
  734. (illustrating all constant minimal realizations of a linear system;
  735. Brockett, `Finite Dimensional Linear Systems')
  736.       (A commutative diagram appears here in the printed output.)
  737.   which is produced with the code
  738.      $$\sarrowlength=.42\harrowlength
  739.      \commdiag{&R^m\cr &\arrow(-1,-1)\lft{\bf B}\quad \arrow(1,-1)\rt{\bf G}\cr
  740.      R^n&\mapright^{\bf P}&R^n\cr
  741.      \mapdown\lft{e^{{\bf A}t}}&&\mapdown\rt{e^{{\bf F}t}}\cr
  742.      R^n&\mapright^{\bf P}&R^n\cr
  743.      &\arrow(1,-1)\lft{\bf C}\quad \arrow(-1,-1)\rt{\bf H}\cr
  744.      &R^q\cr}$$
  745.   Other commutative diagram examples appear in the file
  746. `commdiags.tex', which is distributed with this package.
  747.   In these examples the arrow lengths and line slopes were carefully
  748. chosen to blend with each other.  In the first example, the default
  749. settings for the arrow lengths are used, but a direction for the arrow
  750. must be chosen.  The ratio of the default horizontal and vertical arrow
  751. lengths is approximately the golden mean gamma=1.618...; the arrow
  752. direction closest to this mean is `(3,2)'. In the second example, a
  753. slope of -1/3 is desired and the default horizontal arrow length is 60
  754. pt; therefore, choose a vertical arrow length of 20 pt.  You may affect
  755. the interline glue settings of `\commdiag' by redefining the macro
  756. `\commdiagbaselines'.  (cf. Exercise 18.46 of `The TeXbook' and the
  757. section on parameters below.)
  758.   The width, height, and depth of all morphisms are hidden so that the
  759. morphisms' size do not affect arrow positions.  This can cause a large
  760. morphism at the top or bottom of a diagram to impinge upon the text
  761. surrounding the diagram.  To overcome this problem, use TeX's
  762. `\noalign' primitive to insert a `\vskip' immediately above or below
  763. the offending line, e.g.,
  764. `$$\commdiag{\noalign{\vskip6pt}X&\mapright^\int&Y\cr ...}'.
  765.   The macro `\commdiag' is too simple to be used for more complicated
  766. diagrams, which may have intersecting or overlapping arrows.  A second
  767. approach, borrowed from Francis Borceux's `Diagram' macros for LaTeX,
  768. treats the commutative diagram like a grid of identically shaped boxes.
  769. To compose the commutative diagram, first draw an equally spaced grid,
  770. e.g.,
  771.                               . . . . . .
  772.                               . . . . . .
  773.                               . . . . . .
  774.                               . . . . . .
  775.   on a piece of scratch paper.  Then draw each element (vertices and
  776. arrows) of the commutative diagram on this grid, centered at each grid
  777. point.  Finally, use the macro `\gridcommdiag' to implement your design
  778. as a TeX alignment.  For example, the cubic diagram
  779.                  (A commutative diagram appears here.)
  780.   that appears in Francis Borceux's documentation can be implemented on
  781. a 7 by 7 grid, and is achieved with the code
  782.      $$\harrowlength=48pt \varrowlength=48pt \sarrowlength=20pt
  783.      \def\cross#1#2{\setbox0=\hbox{$#1$}%
  784.        \hbox to\wd0{\hss\hbox{$#2$}\hss}\llap{\unhbox0}}
  785.      \gridcommdiag{&&B&&\mapright^b&&D\cr
  786.      &\arrow(1,1)\lft a&&&&\arrow(1,1)\lft d\cr
  787.      A&&\cross{\hmorphposn=12pt\mapright^c}{\vmorphposn=-12pt\mapdown\lft f}
  788.      &&C&&\mapdown\rt h\cr\cr
  789.      \mapdown\lft e&&F&&\cross{\hmorphposn=-12pt\mapright_j}
  790.      {\vmorphposn=12pt\mapdown\rt g}&&H\cr
  791.      &\arrow(1,1)\lft i&&&&\arrow(1,1)\rt l\cr
  792.      E&&\mapright_k&&G\cr}$$
  793.   The dimensions `\hgrid' and `\vgrid' control the horizontal and
  794. vertical spacing of the grid used by `\gridcommdiag'. The default
  795. setting for both of these dimensions is 15 pt.  Note that in the
  796. example of the cube the arrow lengths must be adjusted so that the
  797. arrows overlap into neighboring boxes by the desired amount.  Hence,
  798. the `\gridcommdiag' method, albeit more powerful, is less automatic
  799. than the simpler `\commdiag' method.  Furthermore, the ad hoc macro
  800. `\cross' is introduced to allow the effect of overlapping arrows.
  801. Finally, note that the positions of four of the morphisms are adjusted
  802. by setting `\hmorphposn' and `\vmorphposn'.
  803.   One is not restricted to a square grid.  For example, the proof of
  804. Zassenhaus's Butterfly Lemma can be illustrated by the diagram
  805. (appearing in Lang's book `Algebra')
  806.                  (A commutative diagram appears here.)
  807.   This diagram may be implemented on a 9 by 12 grid with an aspect ratio
  808. of 1/2, and is set with the code
  809.      $$\hgrid=16pt \vgrid=8pt \sarrowlength=32pt
  810.      \def\cross#1#2{\setbox0=\hbox{$#1$}%
  811.        \hbox to\wd0{\hss\hbox{$#2$}\hss}\llap{\unhbox0}}
  812.      \def\l#1{\llap{$#1$\hskip.5em}}
  813.      \def\r#1{\rlap{\hskip.5em$#1$}}
  814.      \gridcommdiag{&&U&&&&V\cr &&\bullet&&&&\bullet\cr
  815.      &&\sarrowlength=16pt\sline(0,1)&&&&\sarrowlength=16pt\sline(0,1)\cr
  816.      &&\l{u(U\cap V)}\bullet&&&&\bullet\r{(U\cap V)v}\cr
  817.      &&&\sline(2,-1)&&\sline(2,1)\cr
  818.      &&\cross{=}{\sline(0,1)}&&\bullet&&\cross{=}{\sline(0,1)}\cr\cr
  819.      &&\l{^{\textstyle u(U\cap v)}}\bullet&&\cross{=}{\sline(0,1)}&&
  820.       \bullet\r{^{\textstyle(u\cap V)v}}\cr
  821.      &\sline(2,1)&&\sline(2,-1)&&\sline(2,1)&&\sline(2,-1)\cr
  822.      \l{u}\bullet&&&&\bullet&&&&\bullet\r{v}\cr
  823.      &\sline(2,-1)&&\sline(2,1)&&\sline(2,-1)&&\sline(2,1)\cr
  824.      &&\bullet&&&&\bullet\cr &&u\cap V&&&&U\cap v\cr}$$
  825.   Again, the construction of this diagram requires careful choices for
  826. the arrow lengths and is facilitated by the introduction of the ad hoc
  827. macros `\cross', `\r', and `\l'.  Note also that superscripts were used
  828. to adjust the position of the vertices u(U intersection v) and (u
  829. intersection V)v.  Many diagrams may be typeset with the predefined
  830. macros that appear here; however, ingenuity is often required to handle
  831. special cases.
  832. File: eplain.info,  Node: Commutative diagram parameters,  Prev: Construction of commutative diagrams,  Up: Commutative diagrams
  833. Commutative diagram parameters
  834. ------------------------------
  835.   The following is a list describing the parameters used in the
  836. commutative diagram macros.  These dimensions may be changed globally or
  837. locally.
  838. `\harrowlength'
  839.      (Default: 60 pt) The length of right or left arrows.
  840. `\varrowlength'
  841.      (Default: 0.618`\harrowlength') The length of up or down arrows.
  842. `\sarrowlength'
  843.      (Default: 60 pt) The horizontal length of slanted arrows.
  844. `\hmorphposn'
  845.      (Default: 0 pt) The horizontal position of the morphism with
  846.      respect to its default position.  There are also the dimensions
  847.      `\hmorphposnup', `\hmorphposndn', `\hmorphposnrt', and
  848.      `\hmorphposnlft' for `^'/`_' or `\lft'/`\rt' constructions.
  849. `\vmorphposn'
  850.      (Default: 0 pt) The vertical position of the morphism with respect
  851.      to its default position. There are also the dimensions
  852.      `\vmorphposnup', `\vmorphposndn', `\vmorphposnrt', and
  853.      `\vmorphposnlft' for `^'/`_' or `\lft'/`\rt' constructions.
  854. `\morphdist'
  855.      (Default: 4 pt) The distance of morphisms from slanted lines or
  856.      arrows.
  857. `\channelwidth'
  858.      (Default: 3 pt) The distance between double lines or arrows.
  859. `\hchannel, \vchannel'
  860.      (Defaults: 0 pt) Overrides `\channelwidth'. The horizontal and
  861.      vertical shifts between double lines or arrows.
  862. `\commdiagbaselines'
  863.      (Default: `\baselineskip=15pt \lineskip=3pt \lineskiplimit=3pt ')
  864.      The parameters used by `\commdiag' for setting interline glue.
  865. `\hgrid'
  866.      (Default: 15 pt) The horizontal spacing of the grid used by
  867.      `\gridcommdiag'.
  868. `\vgrid'
  869.      (Default: 15 pt) The vertical spacing of the grid used by
  870.      `\gridcommdiag'.
  871. File: eplain.info,  Node: Programming definitions,  Next: Copying,  Prev: Arrow theoretic diagrams,  Up: Top
  872. Programming definitions
  873. ***********************
  874.   The definitions in this section are only likely to be useful when you
  875. are writing nontrivial macros, not when writing a document.
  876. * Menu:
  877. * Category codes::              Changing category codes.
  878. * Allocation macros::           Non-outer versions of \newcount et al.
  879. * Iteration::                   Doing `for' loops in TeX.
  880. * Macro arguments::             Reading and ignoring them.
  881. * Converting to characters::    Normalizing control sequences and spaces.
  882. * Expansion::                   Controlling expansion.
  883. * Obeying spaces::              Making whitespace count anywhere.
  884. * Writing out numbers::         Making `1' into `one'.
  885. * Mode-specific penalties::
  886. * Auxiliary files::             Testing for their existence.
  887. File: eplain.info,  Node: Category codes,  Next: Allocation macros,  Up: Programming definitions
  888. Category codes
  889. ==============
  890.   Plain TeX defines `\active' (as the number 13) for use in changing
  891. category codes.  Although the author of `The TeXbook' has
  892. "intentionally kept the category codes numeric", two other categories
  893. are commonly used: letters (category code 11) and others (12).
  894. Therefore, Eplain defines `\letter' and `\other'.
  895.   Sometimes it is cleaner to make a character active without actually
  896. writing a `\catcode' command.  The `\makeactive' command takes a
  897. character as an argument to make active (and ignores following spaces).
  898. For example, here are two commands which both make `\' active:
  899.      \makeactive`\\   \makeactive92
  900.   Usually, when you give a definition to an active character, you have
  901. to do so inside a group where you temporarily make the character active,
  902. and then give it a global definition (cf. the definition of
  903. `\obeyspaces' in `The TeXbook').  This is inconvenient if you are
  904. writing a long macro, or if the character already has a global
  905. definition you do not wish to transcend.  Eplain provides `\letreturn',
  906. which defines the usual end-of-line character to be the argument.  For
  907. example:
  908.      \def\mymacro{... \letreturn\myreturn ... }
  909.      \mymacro hello
  910.      there
  911.   The end-of-line between `hello' and `there' causes `\myreturn' to be
  912. expanded.
  913.   `The TeXbook' describes `\uncatcodespecials', which makes all
  914. characters which are normally "special" into "other" characters, but
  915. the definition never made it into plain TeX.  Eplain therefore defines
  916.   Finally, `\percentchar' expands into a literal `%' character.  This
  917. is useful when you `\write' TeX output to a file, and want to avoid
  918. spurious spaces.  For example, Eplain writes a `\percentchar' after the
  919. definition of cross-references.  The macros `\lbracechar' and
  920. `\rbracechar' expand similarly.
  921.